Versions:

  • 1.2.7
  • 1.2.6
  • 1.2.5
  • 1.2.4
  • 1.2.3

tgrep from Microsoft is a grep tool that works with a trigram index and a client/server architecture in order to make regular expression searches fast in large codebases. Conventional grep programs read every file on each search. tgrep takes a different route and builds a trigram index in advance, that is an index of the three-character sequences occurring in the files. From the search pattern it can then determine which files could match at all, and only those files are touched during the search. A background server watches for file changes and keeps the index current, so later searches remain fast even while the code is being edited. The client sends its queries to this server. According to the description, tgrep is integrated into GitHub Copilot CLI, where it powers fast grep searches across large repositories. The software belongs to the categories of developer tools and code search; its tags name code search, grep, regex and search. Typical use cases are finding all uses of a function or identifier in a very large repository, searching with complex regular expressions without long waiting times, and supplying coding agents and other tools with quick search results as they explore a codebase. It is of benefit wherever the size of a repository makes ordinary scanning searches noticeably slow. Version 1.2.7 is current in the catalog, and several versions of tgrep are available.

Tags: